package com.tju.elm_bk.rich.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class VirtualWalletTransaction {
    @Schema(description = "交易id")
    private Long id;
    @Schema(description = "交易类型 0-支付 1-收款 2-提现 3-充值")
    private Integer type;
    @Schema(description = "操作金额是否为冻结 0-否 1-是")
    private Integer status;
    @Schema(description = "操作金额")
    private BigDecimal amount;
    @Schema(description = "转出钱包 交易类型为充值时值为0")
    private Long fromAccount;
    @Schema(description = "转入钱包 交易类型为提现时值为0")
    private Long toAccount;
    @Schema(description = "逻辑删除")
    private Integer isDeleted;
    @Schema(description = "手续费或奖励")
    private BigDecimal fee;
    @Schema(description = "手续费率或奖励率")
    private Float feeRate;
    @Schema(description = "交易时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime updateTime;
    @Schema(description = "若是订单支付的流水，关联订单id，用于冻结操作")
    private Long orderId;
}
